package com.guardian;

import java.io.IOException;

import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.portlet.PortletException;
import javax.portlet.PortletPreferences;

import com.liferay.portal.kernel.util.ParamUtil;
import com.liferay.util.bridges.mvc.MVCPortlet;

/**
 * Portlet implementation class GuardianPortlet
 */
public class GuardianPortlet extends MVCPortlet {
 
	public void setGreeting(ActionRequest actionRequest,
			ActionResponse actionResponse) throws IOException, PortletException {
		
		String greetingMsg = ParamUtil.getString(actionRequest, "greetingMsg");
		
		PortletPreferences preferences = actionRequest.getPreferences();
		
		preferences.setValue("greeting-msg", greetingMsg);
		preferences.store();
	}
}